/*
 *  Copyright 2009 David Kuhn <david.s.kuhn at gmail.com>.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */
package com.google.code.teamtools.domain.impl;

import com.google.code.teamtools.domain.IRoleGroup;

/**
 * <code>IRoleGroup</code> implementation.
 * 
 * @author David Kuhn
 */
public class RoleGroup implements IRoleGroup
{
	private Long id = null;
	private String description;
	private String name;
	
	public RoleGroup()
	{
	}
	
	public RoleGroup(Long id)
    {
        setId(id);
    }
	
	public RoleGroup(String name)
	{
		setName(name);
	}
	
	public RoleGroup(String name, String description)
	{
		this(name);
		setDescription(description);
	}
	
	/* (non-Javadoc)
	 * @see com.google.code.teamtools.domain.IRoleGroup#getDescription()
	 */
	public String getDescription()
	{
		return description;
	}

	/* (non-Javadoc)
	 * @see com.google.code.teamtools.domain.IRoleGroup#getId()
	 */
	public Long getId()
	{
		return id;
	}

	/* (non-Javadoc)
	 * @see com.google.code.teamtools.domain.IRoleGroup#getName()
	 */
	public String getName()
	{
		return name;
	}

	/* (non-Javadoc)
	 * @see com.google.code.teamtools.domain.IRoleGroup#setDescription(java.lang.String)
	 */
	public void setDescription(String description)
	{
		this.description = description;
	}
	
	/* (non-Javadoc)
	 * @see com.google.code.teamtools.domain.IRoleGroup#setName(java.lang.String)
	 */
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String toString()
    {
        StringBuilder sb = new StringBuilder();
        sb.append("RoleGroup[");
        sb.append("id:");
        sb.append(this.getId());
        sb.append("|name:");
        sb.append(this.getName());
        sb.append("|description:");
        sb.append(this.getDescription());
        sb.append("]");
        
        return sb.toString();
    }
	
	private void setId(Long id)
	{
		this.id = id;
	}
}
